public class Main
{
    public static final int NB = 13;
    public static void main(String[] args)
    {
        Thread[] threads = new Thread[2 * NB];
        for (int i = 0; i < 2 * NB; ++i)
            threads[i] = new Thread(new Person(NB, NB, i % 2 == 0 ? Room.A : Room.B));
        for (Thread i : threads)
        {
            try {
                Thread.sleep((long) (Math.random() * Person.WAIT_TIME) + Person.WAIT_OFFSET);
            } catch (InterruptedException e) {
                e.printStackTrace();
                System.exit(1);
            }
            i.start();
        }
    }
}
